#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include "QtNetwork/QTcpSocket"
#include "QtNetwork/QHostAddress"
#include <QMainWindow>

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private slots:
    void on_pushButton_clicked();
    void connecteds();
    void readClient();
private:
    Ui::MainWindow *ui;
     QTcpSocket * socket;
     int condition=0;
    void ifdata(QString str);

    void data();
    void socketContent();
    void reconnected();
};

#endif // MAINWINDOW_H
